<?php

echo "hellozof";exit;

$data = json_encode(['grant_type' => 'client_credentials','client_id'=>'test','client_secret'=>'321pg']);
$rsaPublic = base64_encode('-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHHKevQD4cxpuV5l3DOroHCY2J
98vad8V1yTopBPmFmdnAbyNGJy7GD6/96cbsEHaQ6c5ME/eLJs+Day9lnkofrMUS
lJ2Zb7ftA9m1SX+ihJ1Hw3PjlX6CuZs6TjMuANQ3ZCoekeS29uaUavsjZGZ+v/F/
GlpNG0BYkrb9tzo3rwIDAQAB
-----END PUBLIC KEY-----');
openssl_public_encrypt($data, $encrypted, base64_decode($rsaPublic));
$a = base64_encode($encrypted);


$data = json_encode(['grant_type' => 'refresh_token','client_id'=>'test','client_secret'=>'321pg','refresh_token'=>'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiJhZHZpc2VyLW1pY3Jvc2VydmljZSIsImNsaWVudElkIjoidGVzdCIsImV4cGlyZXNJbiI6NjA0ODAwLCJjcmVhdGVUaW1lIjoxNjIxNDk0NjY2LCJncmFudFR5cGUiOiJyZWZyZXNoX3Rva2VuIn0.ftR_IMIglkllSgHJxrEATJPS7Lc3C1x8nxnnp4znJIkwqH_B2vzrLpj_ijpdPybCtFVs9f7HLhgoF6PsCJdc_QMvaG4kgq1_Af99nIkITMw9Sl6gi-3ivrL_xs3W6ddR7tVrxGw7fE3nD84ZdWwmJbhg-hR1REnULqnj427MLAc']);
$rsaPublic = base64_encode('-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHHKevQD4cxpuV5l3DOroHCY2J
98vad8V1yTopBPmFmdnAbyNGJy7GD6/96cbsEHaQ6c5ME/eLJs+Day9lnkofrMUS
lJ2Zb7ftA9m1SX+ihJ1Hw3PjlX6CuZs6TjMuANQ3ZCoekeS29uaUavsjZGZ+v/F/
GlpNG0BYkrb9tzo3rwIDAQAB
-----END PUBLIC KEY-----');
openssl_public_encrypt($data, $encrypted, base64_decode($rsaPublic));
$a = base64_encode($encrypted);
echo $a;exit;



$rasPrivate = '-----BEGIN PRIVATE KEY-----
MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMccp69APhzGm5Xm
XcM6ugcJjYn3y9p3xXXJOikE+YWZ2cBvI0YnLsYPr/3pxuwQdpDpzkwT94smz4Nr
L2WeSh+sxRKUnZlvt+0D2bVJf6KEnUfDc+OVfoK5mzpOMy4A1DdkKh6R5Lb25pRq
+yNkZn6/8X8aWk0bQFiStv23OjevAgMBAAECgYEAqkVK8IdTlnARJQM3M3jJFLOK
om2RmmXKKovGfMWQTDvhBrsDwz5GtYE80zpTrhP2EL6geFaq3gh2dL/4bEIMx787
jKxET/o/00yarm2/hLx1t29YRwNmkK3x4oIfg6QJeRHuD62q+V4dhxrtL6uPWktf
WCKzBWC4zIcM034raSECQQDojPdO6rKSl+CzF3QKpivObshXSghtQoaxklo+/KLy
FyN4A4MlKxFXzi9rsu9Ovm0WwNMLtw5KVmsQ2HgjdNc7AkEA2zCBjmC3VAk9BmKl
MBh4ZIi0NCBmJhuNbrnsMQrZK3ATx23ps1BHywZRjezaYxhR2p/7xAohi+lDqE5U
tLgiHQJATBEYMBMrGDJfyJUKWxVhzOOF2q+XtA2Hu3vQ0zuWHTQeYPpdIoJE6QDD
mCnuh0ZYrpGiNvnIzd4YpWj5Wzez0wJBAKdxcbdjmQlAmXbUSt7oAqjCae9cRMyd
xbitnYqFgAuX7fQuuhY6oO2u4QRryRVkkbtS9hD3sFLimsXrOPhppd0CQQC83kbn
2PE6Vz+z5Eid1CF+I3D91oGVlqBPIu31WxLT51p6r/FUM978bko5cNnaueNM8zli
WJM95XvzDoVJFHz9
-----END PRIVATE KEY-----';

$data = 'aiKqO8Ufl5UeixgvUWRfu8Z5eK+eOn0/vu7lOsLcpO/xCFV3tnPBTTD1Vl/bcMqyw9n5VeNb1K+9b1jVKHJwXORV0XAu03e617PxEBsMI6So2+RZC3ox0dT5U13Y8CS2N0oANTlEXdFhI5Ntl1gKqiqbLpRlTB5To6d
QtGnvSZU=';
openssl_private_decrypt(base64_decode($data), $decrypted, $rasPrivate);
print_r(empty($decrypted) ? '' : $decrypted);

exit;


$data["task_id"]=1;
$data['list']=["13245678915"];
$data['timestamp']=$time;
$data['app_id']='test';
$data['app_secret']="321pg";
foreach ($data as $key => $val) {
    if (is_array($val)) {
        $data[$key] = json_encode($val, JSON_UNESCAPED_UNICODE);
    }
}
ksort($data);
$originSign = md5(implode('&', $data));
echo $time ."\n" . $originSign;

exit;
$str = 'appId=marketing_center_uat&nonce=118866&timestamp=1611712368';
$key = 'OjDpPU4Qvbn6T9XtDEWqQOVFW6OZjNrA';
echo urlencode(base64_encode(hash_hmac("sha1", $str, $key, true)));
exit;

$a = 15088132455;
$b = [];
for($i=0;$i<=5000;$i++) {
    $a+=1;
    $b[] = '"'.$a . '"';
}

file_put_contents('a.txt',implode(',',$b));